package com.bootdo.system.dao;

import java.util.List;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

public interface BaseMapper<T> {
	
	@SelectProvider(type=BaseSqlProvider.class,method="get")
	T get(Class<T> c,Long id);
	
	@SelectProvider(type=BaseSqlProvider.class,method="list")
	List<T> list(T t, @Param("orderBy")String orderBy);
	
	@DeleteProvider(type=BaseSqlProvider.class,method="delete")
	int delete(Class<T> c,Long id);

	@InsertProvider(type=BaseSqlProvider.class,method="save")
	int save(T obj);

	@UpdateProvider(type=BaseSqlProvider.class,method="update")
	int update(T obj);
}
